package com.zmzncs.lmtc.module.order.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zmzncs.lmtc.module.order.pojo.orderCompareResult.OrderCompareResultDTO;
import com.zmzncs.lmtc.module.order.pojo.order_history.OrderHistory;
import com.zmzncs.lmtc.module.order.pojo.order_history.OrderHistoryDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 财务-对账账单表 Mapper 接口
 * </p>
 *
 * @author
 * @since 2021-04-07
 */
@Repository
@Mapper
public interface OrderHistoryDao extends BaseMapper<OrderHistory> {


    List<OrderHistoryDTO> selectOrderHistoryByDate(@Param("tableName")String tableName, @Param("begin") String begin, @Param("end") String end);

    List<OrderHistoryDTO> selectOrderHistoryByTradeCode(@Param("tableName")String tableName, @Param("tradeNo") String tradeNo);

     IPage<OrderCompareResultDTO> selectOrderCompareToBolianHistory(Page page,@Param("tableName")String tableName, @Param("begin") String begin, @Param("end") String end);

    /**查询数据库是否创建表*/
    int isExistTable(@Param("schemaName") String schemaName, @Param("tableName") String tableName);


}
